snippet / "he" b
-- ${1:hello} 
endsnippet

snippet // "sepeartor line" b
----------------------------------${1}------------------------------------${0}
endsnippet

snippet /b "block comment" b
----------------------------------------------------------------------
-- ${1}
----------------------------------------------------------------------${0}
endsnippet

snippet /f "function comment" b
--${0}
endsnippet

snippet if "if statement" b
if ${1} then
	${2}
end${0}
endsnippet

snippet els "else statement" b
else ${1} then
end${0}
endsnippet

snippet elif "elseif statement" b
elseif ${1} then ${0}
endsnippet

snippet ife "if statement" b
if ${1} then
	${2}
else
	${3}
end${0}
endsnippet

snippet fun "function" b
function ${1:function_name}(${2:param})
	${3:body}
end${0}
endsnippet

snippet fori "for statement" b
for ${1:index}=${2:1}, #${3:container} do
	${4:body}
end${0}
endsnippet

snippet forp "for pairs statement" b
for ${1:k},${2:v} in pairs(${3:container}) do
	${4:body}
end${0}
endsnippet

snippet forpi "for pairs statement" b
for ${1:index},${2:v} in ipairs(${3:container}) do
	${4:body}
end${0}
endsnippet

snippet lv "local variable" b
local ${1:part1} = ${2:value}${0}
endsnippet

snippet lt "local table" b
local ${1:table_name} = {
	${2:field}
}${0}
endsnippet

snippet kv "key = value" b
${1:key} = ${2:value}${0}
endsnippet

snippet kv? "key = value" i
${1:key} = ${2:value}${0}
endsnippet

snippet c? "conditional ?" 
(${1:condition} and ${2:result_yes} or ${3:result_no})${0}
endsnippet

snippet td "todo" b
-- TODO: ${1}
endsnippet

snippet sinc "self increase by" b
${1:self} = $1 + ${2:1}${0}
endsnippet

snippet sdec "self decrease by" b
${1:self} = $1 - ${2:1}${0}
endsnippet

# -------------- for hzw lua scripts -------------- 
snippet hms "messagebox page" b
MessageBoxPage:Msg_Box_Lan(${1})${0}
endsnippet

snippet hlms "messagebox page" b
MessageBoxPage:Msg_Box_Lan("@${1}")${0}
endsnippet

snippet ccl "cclog" b
CCLuaLog("${1}")${0}
endsnippet

snippet sendp "send packet" b
container:sendPakcet(${1}, ${2:data}, #$2, ${3:true})${0}
endsnippet

snippet sendp2 "PacketManager send packet" b
PacketManager:getInstance():sendPakcet(${1}, ${2:data}, #$2, ${3:true})${0}
endsnippet

snippet handp "handler map" b
${1:data} = "$1",${0}
endsnippet

snippet selfc "self call function" i
self:${1:func_name}(${2:params})${0}
endsnippet

snippet hcc "hzw big comment" b
----------------------------------------------------------------------------------
--[[
	FILE:			${1:file_name}.lua
	ENCODING:		UTF-8, no-bomb
	DESCRIPTION:	${2:desc}
	AUTHOR:			sunyj
	CREATED:		2015-${3:day}
--]]
----------------------------------------------------------------------------------${0}
endsnippet
